package cn.nuc.edu.onlinestore.entity;

/**
 * 用户实体
 * 
 * @author 王凯
 * 
 */
public class Sysuser {

	/**
	 * 用户id
	 */
	private Integer userid;

	/**
	 * 角色id
	 */
	private Integer roleid;

	/**
	 * 用户名
	 */
	private String username;

	/**
	 * 真实姓名
	 */
	private String usertruename;

	/**
	 * 用户密码
	 */
	private String userpwd;
	
	/**
	 * 账户余额
	 */
	private Float useraccount;

	/**
	 * 用户状态
	 */
	private Integer userstate;

	/**
	 * 角色名称
	 */
	private String rolename;

	public Integer getUserid() {
		return userid;
	}

	public void setUserid(Integer userid) {
		this.userid = userid;
	}

	public Integer getRoleid() {
		return roleid;
	}

	public void setRoleid(Integer roleid) {
		this.roleid = roleid;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getUsertruename() {
		return usertruename;
	}

	public void setUsertruename(String usertruename) {
		this.usertruename = usertruename;
	}

	public String getUserpwd() {
		return userpwd;
	}

	public void setUserpwd(String userpwd) {
		this.userpwd = userpwd;
	}

	public Float getUseraccount() {
		return useraccount;
	}
	
	public void setUseraccount(Float useraccount) {
		this.useraccount = useraccount;
	}

	public Integer getUserstate() {
		return userstate;
	}

	public void setUserstate(Integer userstate) {
		this.userstate = userstate;
	}

	public String getRolename() {
		return rolename;
	}

	public void setRolename(String rolename) {
		this.rolename = rolename;
	}

	@Override
	public String toString() {
		return "Sysuser [userid=" + userid + ", roleid=" + roleid + ", username=" + username + ", usertruename="
				+ usertruename + ", userpwd=" + userpwd + ", useraccount=" + useraccount + ", userstate=" + userstate
				+ ", rolename=" + rolename + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((roleid == null) ? 0 : roleid.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Sysuser other = (Sysuser) obj;
		if (roleid == null) {
			if (other.roleid != null)
				return false;
		} else if (!roleid.equals(other.roleid))
			return false;
		return true;
	}
	
}
